<?php
namespace TennisTournament\Service;

use TennisTournament\Model\GroupStats;
use TennisTournament\Model\Match;
use TennisTournament\Model\Player;

interface GroupStatsService extends GenericService {

    /**
     * Encode GroupStats to JSON object
     * @param GroupStats $groupStats
     * @return string
     */
    public function toJSON(GroupStats $groupStats);

    /**
     * Update player stats depend of results from one Match
     * @param Player $player
     * @param array $collectionResult
     * @param $hostGuest
     * @param $isAWinner
     * @return void
     */
    public function updateStats(Player $player, array $collectionResult, $hostGuest, $isAWinner);

}